# 方法一
import random

list_3 = ['剪刀', '石头', '布']
computer = random.choice(list_3)
x = input("请输入石头，剪刀或布\n")
print(computer)
if x == "石头" and computer == "石头":
    print("平局")
if x == "石头" and computer == "剪刀":
    print("你赢了")
if x == "石头" and computer == "布":
    print("你输了")
if x == "剪刀" and computer == "剪刀":
    print("平局")
if x == "剪刀" and computer == "布":
    print("你赢了")
if x == "剪刀" and computer == "石头":
    print("你输了")
if x == "布" and computer == "布":
    print("平局")
if x == "布" and computer == "石头":
    print("你赢了")
if x == "布" and computer == "剪刀":
    print("你输了")
    # import random
list_3 = ['剪刀', '石头', '布']
computer = random.choice(list_3)
personal = input('请输入你要出什么：\n')
print(computer)
if (computer == '剪刀' and personal == '石头') or (computer == '石头' and personal == '布') or (
        computer == '布' and personal == '剪刀'):
    print('玩家胜利')
elif computer == personal:
    print('平局')
else:
    print('电脑获胜')
